package com.ygqh.baby.model;

import com.foxinmy.weixin4j.util.StringUtil;
import com.ygqh.baby.ao.CouponStatus;
import com.ygqh.baby.ao.SalesPlatform;
import com.ygqh.baby.ao.SceneType;
import com.ygqh.baby.utils.DateConvertUtils;
import org.apache.commons.collections4.CollectionUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class YgCouponModel implements Serializable {

    private Long couponDetailId;

    private Long userId;

    private Long supplierId;

    private String couponTitle;

    private BigDecimal faceValue;

    private BigDecimal limitPrice;

    private String couponCode;

    private Date startDate;

    private Date endDate;

    private String remark;

    private CouponStatus couponStatus;

    private Long couponId;

    private Boolean isFullCourt;

    private SalesPlatform salesPlatform;

    private SceneType sceneType;

    private Long brandId;

    private String brandName;

    private String userName;

    private List<Long> relateIdList;

    public String getStartDateStr() {
        if (startDate == null) {
            return "";
        }
        return DateConvertUtils.format(startDate);
    }

    public String getEndDateStr() {
        if (endDate == null) {
            return "";

        }
        return DateConvertUtils.format(endDate);
    }

    public Long getCouponDetailId() {
        return couponDetailId;
    }

    public void setCouponDetailId(Long couponDetailId) {
        this.couponDetailId = couponDetailId;
    }

    public BigDecimal getLimitPrice() {
        return limitPrice;
    }

    public void setLimitPrice(BigDecimal limitPrice) {
        this.limitPrice = limitPrice;
    }

    public CouponStatus getCouponStatus() {
        return couponStatus;
    }

    public void setCouponStatus(CouponStatus couponStatus) {
        this.couponStatus = couponStatus;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getCouponTitle() {
        return couponTitle;
    }

    public void setCouponTitle(String couponTitle) {
        this.couponTitle = couponTitle;
    }

    public BigDecimal getFaceValue() {
        return faceValue;
    }

    public void setFaceValue(BigDecimal faceValue) {
        this.faceValue = faceValue;
    }

    public String getCouponCode() {
        return couponCode;
    }

    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getProductIds() {
        if (CollectionUtils.isNotEmpty(relateIdList)) {
            return StringUtil.join(relateIdList, ",".charAt(0));
        }
        return null;
    }

    public List<Long> getRelateIdList() {
        return relateIdList;
    }

    public void setRelateIdList(List<Long> relateIdList) {
        this.relateIdList = relateIdList;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public Boolean getIsFullCourt() {
        return isFullCourt;
    }

    public void setIsFullCourt(Boolean isFullCourt) {
        this.isFullCourt = isFullCourt;
    }

    public SalesPlatform getSalesPlatform() {
        return salesPlatform;
    }

    public void setSalesPlatform(SalesPlatform salesPlatform) {
        this.salesPlatform = salesPlatform;
    }

    public SceneType getSceneType() {
        return sceneType;
    }

    public void setSceneType(SceneType sceneType) {
        this.sceneType = sceneType;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
